import React from 'react';
import { useModel } from 'umi';
import { Button } from 'antd';

const HomePage: React.FC = () => {
  const { themeColor } = useModel('@@initialState');
  
  return (
    <div>
      <h1>欢迎使用系统</h1>
      <p>当前主题颜色: 
        <span 
          style={{
            display: 'inline-block',
            width: 20,
            height: 20,
            backgroundColor: themeColor,
            marginLeft: 10,
            verticalAlign: 'middle'
          }}
        />
      </p>
      
      {/* 使用主题颜色的按钮 */}
      <Button type="primary" style={{ marginTop: 20 }}>
        主题色按钮
      </Button>
    </div>
  );
};

export default HomePage;